package com.example.moviepro.entity;

import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import lombok.Data;

@Data
public class Comment {

    @NotNull
    private int id;
    @NotNull
    private int movieId;
    @NotBlank(message="评论内容不能为空")
    @Size(max=500,message="评论长度不能超过500个字符")
    private String content;
    @NotNull(message="评分不能为空")
    @Min(value=1,message="评分至少为1")
    @Max(value=5,message="评分不能超过5")
    private Integer rating;
}
